home *** CD-ROM | disk | FTP | other *** search
/ Dino Crisis Digital Press Kit / Dino Crisis Digital Press Kit.iso / mac / Xtras / Behavior Library for Java.cst / 00027_Script_UI Rollover Change Pointer < prev    next >
Text File  |  1998-04-08  |  1KB  |  49 lines

  1. -- Pointer Change on Rollover
  2.  
  3.  
  4. -- Behavior Library 1.1 for Java
  5. -- a control
  6. -- Changes the cursor when the cursor rollsover the sprite
  7.  
  8. property outcurs,  incursSet,  oldcursor
  9.  
  10.  
  11.  
  12. on translate_cursor me, setting
  13.  
  14.   if chars (setting,1,1) = "C" then return (2)
  15.   if chars (setting,1,1) = "A" then return (-1) 
  16.   if chars (setting,1,1) = "W" then return (4) 
  17.   if chars (setting,1,1) = "I" then return (1)
  18.   return (1)
  19. end
  20.  
  21.  
  22. --- 
  23.  
  24. on beginSprite me
  25.   set oldcursor = the cursor of sprite the spritenum of me
  26.   set val =  translate_cursor( me, the incursSet of me)
  27.   set the cursor of sprite the spriteNum of me = val
  28.   
  29. end
  30.  
  31. on endsprite me
  32.   set the cursor of sprite the spriteNum of me = oldcursor
  33. end
  34.  
  35. on getPropertyDescriptionList
  36.   
  37.   set p_list = [ #incursSet: [ #comment:   "Pointer:" ,#format:   #string, #default:   "Watch", #range :["Arrow", "I-Beam", "Crosshair", "Watch"] ]]
  38.   
  39.   return p_list 
  40.   
  41. end
  42.  
  43.  
  44. on getBehaviorDescription
  45.   return "Changes the pointer image when the pointer rolls over the current sprite. Choose one of the Java pointers." & RETURN & "PARAMETERS:" & RETURN & "ï Pointer  - Choose a Java pointer."  
  46.   
  47. end
  48.  
  49.